<p>codemirror</p>
<div class="editor_view">
    <textarea id="codemirror_cypher"></textarea>
</div>
<br>
<div class="editor_view">
    <textarea id="codemirror_demo">CREATE (n:Person { name: 'Dan' }) RETURN n

        function fun() {
                ob = "";
                //alert(editor.getValue()); // 得到所有内容
                //editor.setValue("abc"); // 将编辑器内容改为"abc"
                 
                // 0为起点，2行第3个字母到2行第5个字母
                //alert(editor.getRange({line:1,ch:2},{line:1,ch:5}));  //得到
                //editor.replaceRange("shashasha",{line:1,ch:2},{line:2,ch:5});
                 
                //alert(editor.getLine(2));   // 第三行数据
                //alert(editor.lineCount());   // 总共几行
                //alert(editor.firstLine());   // 首行数0
                //alert(editor.lastLine());   // 末行数19，共20行
                //ob = editor.getLineHandle(1);   // 第二行数据句柄
                //alert(editor.getLineNumber(ob)); // 行句柄在哪行
                //editor.eachLine(0,2,alert(ob));
                 
                //ob = editor.changeGeneration();    // 编辑动作次数，1次起
                //editor.markClean();   // 清除动作
                //editor.isClearn();    // 是否清除
                 
                //ob = editor.getSelection();   // 获得选中的数据一条
                //ob = editor.getSelections();  // 获得选中数据多条
                editor.replaceSelection("ttttttt"); // 选中替换，一条根多条都替换，不选中则在光标处插入
                //editor.replaceSelections(["aaa","bbb"]); // 选中替换，多条对多选
                //editor.setSelection();  //设置选中
                //editor.setSelections();  //设置选中
                //ob = editor.listSelections(); //boj
                //ob = editor.somethingSelected(); // 是否有选中
                //editor.addSelection({line:2,ch:6}, {line:1,ch:2});  // 选中此段
                 
                //ob = editor.getCursor();    // ob['line']、['ch']
                //editor.setCursor(2);    // 设置光标位置
                 
                //ob = editor.hasFocus();   // focus?全false
                 
                //editor.addOverlay("aaaaa"); //..
                //editor.removeOverlay("aaaaa"); //..
                 
                //ob = editor.getDoc();   // 文档对象,很多
                //ob = editor.getEditor();   //..
                 
                //ob = editor.setBookmark({line:1,ch:3}); // 书签对象
                 
                //editor.addWidget({line:1,ch:2},"<if></if>",true); //添加部件
                 
                //editor.setSize(1100,1100);    //设置宽高
                //editor.scrollTo(800,300); // 设置滚动条位置
                 
                //editor.cursorCoords({line:1,ch:2},"aaaaaa"); //..
                 
                //for (var i in ob)
                //    alert(i);
                //alert(ob);
            }
    </textarea>
</div>
<br>
<div class="editor_view">
    <!--选择脚本编码代码-->
    <div class="controls">
        <input class="ck-code" type="radio" name="script_once_type" id="script_once_type1" checked> shell
         <input class="ck-code" type="radio" name="script_once_type" id="script_once_type2"> cypher
         <input class="ck-code" type="radio" name="script_once_type" id="script_once_type3"> sql
    </div>

    <!--选择脚本风格代码-->
    <div class="controls">
        <select id='select'>
             <option>default</option>
             <option>3024-night</option>
             <option selected>erlang-dark</option>
        </select>
    </div>

    <!--textarea-->
    <textarea id="script_once_code">
        #!/bin/sh
    </textarea>
    <textarea id="code2" class="hide">
        #!/usr/bin/env python
        # -*- coding: utf8 -*-
    </textarea>
</div>    
